import axios from "@/utils/request";

export function addTimetable(params){
    return axios({
        method:"post",
        url:"/timetable",
        data:params
    })
}

export function deleteTimetable(params){
    return axios({
        method:"delete",
        url:"/timetable",
        data:params
    })
}

export function updateTimetable(params){
    return axios({
        method:"put",
        url:"/timetable",
        data:params
    })
}

export function selectTimetable(params){
    return axios({
        method:"get",
        url:"/timetable",
        params: {
            pageNum:params.pageNum,
            pageSize:params.pageSize,
            year:params.year,
            classroomId:params.classroomId,
            courseId:params.courseId,
            classId:params.classId,
            teacherId:params.teacherId,
        }
    })
}

export function queryClassTimetable(params){
    return axios({
        method:"post",
        url:"/timetable/queryClassTimetable",
        data:params
    })
}

export function queryTeacherTimetable(params){
    return axios({
        method:"post",
        url:"/timetable/queryTeacherTimetable",
        data:params
    })
}

export function queryClassCourse(params){
    return axios({
        method:"post",
        url:"/timetable/queryClassCourse",
        data:params
    })
}